package api

import "fx_swift_ifcgate/pkg/validator"

type RegisterReq struct {
	Password       string `json:"password" binding:"required"`
	Email          string `json:"email" binding:"required"`
	Code           string `json:"code" binding:"required"`
	InvitationCode string `json:"invitation_code"`
}

func (req RegisterReq) GetMessage() validator.ValidatorMessages {
	return validator.ValidatorMessages{
		"Password.required": "Password不能为空",
		"Email.required":    "Email不能为空",
		"Code.required":     "Code不能为空",
	}
}

type LoginReq struct {
	Email    string `json:"email" binding:"required"`
	Password string `json:"password" binding:"required"`
}

func (req LoginReq) GetMessage() validator.ValidatorMessages {
	return validator.ValidatorMessages{
		"Email.required":    "Email不能为空",
		"Password.required": "Password不能为空",
	}
}

type SignOutReq struct {
	Account string `json:"account" binding:"required"`
}

func (req LoginReq) SignOutReq() validator.ValidatorMessages {
	return validator.ValidatorMessages{
		"Account.required": "Account不能为空",
	}
}

type LoginRes struct {
	Token      string `json:"token"`
	Email      string `json:"email"`
	Account    string `json:"account"`
	MerchantNo string `json:"merchantNo"`
	Status     string `json:"status"`
	MerNameEn  string `json:"merNameEn"`
	MerNameCn  string `json:"merNameCn"`
	FeeStatus  string `json:"feeStatus"`
}
type ForgetPasswordReq struct {
	Code        string `json:"code" binding:"required"`
	Email       string `json:"email" binding:"required"`
	NewPassword string `json:"newPassword" binding:"required"`
}

func (req ForgetPasswordReq) GetMessage() validator.ValidatorMessages {
	return validator.ValidatorMessages{
		"Code.required":        "Code不能为空",
		"Email.required":       "Email不能为空",
		"NewPassword.required": "NewPassword不能为空",
	}
}

type UpdatePasswordReq struct {
	OldPassword string `json:"oldPassword" binding:"required"`
	NewPassword string `json:"newPassword" binding:"required"`
}

func (req UpdatePasswordReq) GetMessage() validator.ValidatorMessages {
	return validator.ValidatorMessages{
		"OldPassword.required": "OldPassword不能为空",
		"NewPassword.required": "NewPassword不能为空",
	}
}

type GetAgentInfoRes struct {
	Email      string `json:"email"`
	Account    string `json:"account"`
	MerchantNo string `json:"merchantNo"`
	Status     string `json:"status"`
	MerNameEn  string `json:"merNameEn"`
	MerNameCn  string `json:"merNameCn"`
	FeeStatus  string `json:"feeStatus"`
}
